Skip to content

Added paginated response support for listing work items - #56

Merged
thijskok merged 8 commits into
testmonitor:masterfrom
thijskok:added-paginated-response-support
Apr 22, 2026
Merged

Added paginated response support for listing work items#56
thijskok merged 8 commits into
testmonitor:masterfrom
thijskok:added-paginated-response-support

Conversation

@thijskok

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a length-aware paginated return type for listing work items, so callers can page through results while also seeing pagination metadata (total/per-page/offset).

Changes:

  • Introduces LengthAwarePaginatedResponse to carry items + pagination metadata.
  • Updates ManagesWorkItems::workitems() to return a paginated response and to page by slicing WIQL-returned IDs.
  • Updates WorkItemsTest expectations to assert the new response type and adds coverage for custom WIQL limits.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
src/Actions/ManagesWorkItems.php Changes workitems() to return a paginated response and adds offset/WIQL limit parameters.
src/Responses/LengthAwarePaginatedResponse.php New response DTO for items + pagination metadata (total, perPage, offset, currentPage).
tests/WorkItemsTest.php Updates tests to expect LengthAwarePaginatedResponse and adds a custom WIQL limit test.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Actions/ManagesWorkItems.php
Comment thread src/Actions/ManagesWorkItems.php
Comment thread src/Actions/ManagesWorkItems.php
Comment thread src/Actions/ManagesWorkItems.php Outdated
Comment thread src/Responses/LengthAwarePaginatedResponse.php
Comment thread src/Responses/LengthAwarePaginatedResponse.php

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Actions/ManagesWorkItems.php
Comment thread README.md
Comment thread tests/WorkItemsTest.php Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
Comment thread src/Actions/ManagesWorkItems.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@thijskok
thijskok merged commit b53cdfc into testmonitor:master Apr 22, 2026
5 checks passed
@thijskok
thijskok deleted the added-paginated-response-support branch April 22, 2026 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants